package com.yqh.dao;


import com.yqh.dto.ProductSearchDTO;
import com.yqh.entity.Product;
import com.yqh.vo.ProductSearchVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 商品模块
 *
 * @author 阳秋豪
 * @createTime 2024/3/22
 */
@Repository
public interface ProductDao extends Mapper<Product> {

    List<ProductSearchVO> getSearchProduct(@Param("searchParam") ProductSearchDTO productSearchDTO);

    @Select("select * from product where product_name=#{productName}")
    Product findByProductName(String productName);
}
